package com.huaxin.hxmoduleworkorder.common.annotation.validation;

import com.huaxin.hxmoduleworkorder.common.validator.MaintenanceOrderPriorityValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = MaintenanceOrderPriorityValidator.class)
public @interface ValidMaintenanceOrderPriority {

    String message() default "无效的维保单优先级，允许值：low/medium/high/urgent";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
